<?php declare(strict_types=1);
/**
 * College2U — Engineering Stream Hub
 * public_html/engineering/index.php · v5.0.0 · May 2026
 *
 * Architecture: bootstrap.php → header.php → content → footer.php
 * Depth: 2 levels deep (public_html/engineering/) → ../../php-portal/includes/
 *
 * SEO intent: "engineering colleges in Bangalore 2026"
 * Schema: BreadcrumbList + FAQPage + Event (KCET / COMEDK)
 */

// ── 1. Bootstrap ──────────────────────────────────────────────────────────────
require_once dirname(__DIR__) . '/includes/bootstrap.php';

// ── 2. Page data ──────────────────────────────────────────────────────────────
$current_year = (int) date('Y');

$engineering_courses = [
    ['title' => 'B.E / B.Tech',    'degree' => 'Bachelor of Engineering / Technology',   'dur' => '4 years',  'seats' => 'KCET / COMEDK',   'href' => c2u_url('engineering/engineering-admission'),  'cta' => 'B.E Admission Guide →'],
    ['title' => 'M.Tech',          'degree' => 'Master of Technology',                    'dur' => '2 years',  'seats' => 'GATE / PGCET',    'href' => c2u_url('engineering/engineering-admission'),  'cta' => 'M.Tech Admission →'],
    ['title' => 'KCET Counselling','degree' => 'Karnataka CET Engineering Counselling',   'dur' => '4 years',  'seats' => 'KCET rank',       'href' => c2u_url('exams/kcet-2026'),                    'cta' => 'KCET Guide →'],
    ['title' => 'COMEDK',          'degree' => 'COMEDK UGET Engineering Admission',        'dur' => '4 years',  'seats' => 'COMEDK rank',     'href' => c2u_url('exams/comedk-2026'),                  'cta' => 'COMEDK Guide →'],
    ['title' => 'CSE / AI / ML',   'degree' => 'Computer Science & Engineering + Variants','dur' => '4 years',  'seats' => 'KCET / COMEDK',   'href' => c2u_url('engineering/engineering-admission'),  'cta' => 'CSE Admission →'],
    ['title' => 'Lateral Entry',   'degree' => 'Direct 2nd-year B.E (Diploma holders)',   'dur' => '3 years',  'seats' => 'DCET rank',       'href' => c2u_url('engineering/engineering-admission'),  'cta' => 'Lateral Entry →'],
];

$top_colleges = [
    ['name' => 'R V College of Engineering',             'short' => 'RVCE',  'type' => 'Private Aided', 'est' => 1963, 'rank' => 'A++'],
    ['name' => 'BMS College of Engineering',             'short' => 'BMSCE', 'type' => 'Private Aided', 'est' => 1946, 'rank' => 'A+'],
    ['name' => 'M S Ramaiah Institute of Technology',    'short' => 'MSRIT', 'type' => 'Private',       'est' => 1962, 'rank' => 'A+'],
    ['name' => 'PES University',                         'short' => 'PESU',  'type' => 'Deemed',        'est' => 1988, 'rank' => 'A+'],
    ['name' => 'Dayananda Sagar College of Engineering', 'short' => 'DSCE',  'type' => 'Private',       'est' => 1979, 'rank' => 'A'],
    ['name' => 'New Horizon College of Engineering',     'short' => 'NHCE',  'type' => 'Private',       'est' => 2001, 'rank' => 'A'],
];

$exam_dates = [
    ['event' => 'KCET ' . $current_year . ' Application Opens',     'date' => $current_year . ' January'],
    ['event' => 'KCET ' . $current_year . ' Exam Date',             'date' => $current_year . ' April'],
    ['event' => 'KCET ' . $current_year . ' Result',                'date' => $current_year . ' May'],
    ['event' => 'COMEDK UGET ' . $current_year . ' Exam',           'date' => $current_year . ' May'],
    ['event' => 'KCET ' . $current_year . ' Option Entry Round 1',  'date' => $current_year . ' July'],
    ['event' => 'COMEDK ' . $current_year . ' Counselling Round 1', 'date' => $current_year . ' July'],
];

$faqs = [
    ['q' => 'What KCET rank is needed for CSE at top Bangalore engineering colleges ' . $current_year . '?',
     'a' => 'A KCET rank under 500 is required for CSE at RVCE and BMS College of Engineering in ' . $current_year . '. MSRIT and PES University CSE seats fill between ranks 500–2,000. For COMEDK, top-college CSE closes at ranks under 3,000. College2U provides a free personalised shortlist based on your exact rank.'],
    ['q' => 'What is the difference between KCET and COMEDK for engineering admission?',
     'a' => 'KCET (Karnataka Common Entrance Test) is conducted by KEA for Karnataka domicile students and covers government-aided college seats at subsidised fees of ₹35,000–₹80,000 per year. COMEDK UGET is open to students from all states for private unaided engineering colleges and seats cost ₹1.5–₹2.5 lakh annually.'],
    ['q' => 'What is the B.Tech fee at private engineering colleges in Bangalore ' . $current_year . '?',
     'a' => 'B.E/B.Tech fees at private engineering colleges in Bangalore range from ₹80,000 to ₹2.5 lakh per year depending on college and branch. KCET-allotted government-aided college fees are as low as ₹35,000 per year. COMEDK and management quota seats cost ₹1.5–₹2.5 lakh annually.'],
    ['q' => 'Can students from other states apply for KCET engineering admission?',
     'a' => 'No. KCET engineering seats are reserved for Karnataka domicile students (born in Karnataka or whose parents are registered Kannada-speaking). Students from other states must appear in COMEDK UGET or JEE Main for admission to Bangalore engineering colleges.'],
    ['q' => 'Which engineering branch has the best placement in Bangalore colleges?',
     'a' => 'Computer Science Engineering (CSE) and AI/ML branches consistently have the highest placement rates at Bangalore engineering colleges. Top recruiters include Google, Amazon, Microsoft, Infosys, and Wipro. Electronics & Communication (ECE) and Mechanical Engineering also have strong placement records at RVCE, BMS, and MSRIT.'],
];

// ── 3. SEO — single c2u_seo() call wires title, meta, canonical, and all JSON-LD
//     through header.php automatically. No raw $page_title or $extra_schemas needed.
// ─────────────────────────────────────────────────────────────────────────────────

// Breadcrumb: 'name' key (not 'label') + c2u_url() for absolute URL in schema.
// c2u_schema_breadcrumb() prepends Home automatically.
$breadcrumbs = [
    ['name' => 'Engineering Colleges', 'url' => c2u_url('engineering')],
];

$seo = c2u_seo([
    'title'       => 'Engineering Colleges in Bangalore ' . $current_year . ' — KCET · COMEDK Cutoff & Fees | College2U',
    'description' => 'Top engineering colleges in Bangalore ' . $current_year . ': KCET & COMEDK cutoffs, B.E/B.Tech fees, branch-wise seats, and free expert counselling. AICTE-approved colleges.',
    'canonical'   => c2u_url('engineering'),
    'og_image'    => c2u_asset('images/og/engineering-stream-og.webp'),
    'page_type'   => 'stream',

    // c2u_schema_breadcrumb() is called via the 'breadcrumbs' shorthand key.
    // c2u_schema_faq() and c2u_schema_event() replace the raw arrays.
    // c2u_schema_organization() + c2u_schema_website() are injected automatically.
    'breadcrumbs' => $breadcrumbs,
    'schema'      => [
        c2u_schema_faq($faqs),
        c2u_schema_event([
            'name'        => 'KCET ' . $current_year . ' — Karnataka Common Entrance Test',
            'start_date'  => $current_year . '-04-15',
            'organizer'   => 'Karnataka Examinations Authority (KEA)',
            'organizer_url' => 'https://kea.kar.nic.in',
        ]),
        c2u_schema_event([
            'name'        => 'COMEDK UGET ' . $current_year,
            'start_date'  => $current_year . '-05-11',
            'organizer'   => 'COMEDK',
            'organizer_url' => 'https://comedk.org',
        ]),
    ],
]);

// ── 4. Page CSS ───────────────────────────────────────────────────────────────
$hero_img_url = c2u_asset('images/banners/engineering-hero.webp');
$extra_head   = '<link rel="preload" as="image" href="' . c2u_e($hero_img_url) . '" fetchpriority="high">
<style nonce="' . c2u_e(C2U_CSP_NONCE) . '">
:root{
  --sa:#3b82f6;--sad:#1d4ed8;--sal:#eff6ff;--sam:#dbeafe;
  --sa-em:#93c5fd;
}
.stream-hero{background:linear-gradient(145deg,#050d1a 0%,#0a1f3b 100%);min-height:min(60vh,520px);display:flex;align-items:center;overflow:hidden;position:relative;isolation:isolate;}
.stream-hero__bg{position:absolute;inset:0;background-image:url("' . c2u_e($hero_img_url) . '");background-size:cover;background-position:center 25%;opacity:.18;z-index:-1;}
.stream-hero__inner{width:100%;max-width:1200px;margin:0 auto;padding:4rem 1.5rem;}
.stream-eyebrow{display:inline-flex;align-items:center;gap:.5rem;background:rgba(59,130,246,.2);border:1px solid rgba(59,130,246,.4);color:#93c5fd;border-radius:2rem;padding:.375rem .875rem;font-size:.8rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;margin-bottom:1.25rem;}
.stream-h1{font-size:clamp(1.875rem,4.5vw,3rem);font-weight:800;color:#fff;letter-spacing:-.025em;margin:0 0 1rem;line-height:1.15;}
.stream-h1 em{color:var(--sa-em);font-style:normal;}
.stream-hero__sub{color:rgba(255,255,255,.72);font-size:1rem;line-height:1.65;margin:0 0 2rem;max-width:600px;}
.stream-hero__ctas{display:flex;flex-wrap:wrap;gap:.75rem;}
.btn--stream-primary{background:var(--sa);color:#fff;font-weight:700;font-size:.9375rem;padding:.75rem 1.75rem;border-radius:.5rem;border:none;cursor:pointer;text-decoration:none;transition:background .2s,transform .15s;display:inline-flex;align-items:center;gap:.5rem;}
.btn--stream-primary:hover{background:var(--sad);transform:translateY(-1px);}
.btn--stream-secondary{background:rgba(255,255,255,.1);color:#fff;font-weight:600;font-size:.9375rem;padding:.75rem 1.75rem;border-radius:.5rem;border:1px solid rgba(255,255,255,.25);text-decoration:none;transition:background .2s;}
.btn--stream-secondary:hover{background:rgba(255,255,255,.18);}
.stream-stats{display:flex;flex-wrap:wrap;gap:2rem;margin-top:2.5rem;padding-top:2rem;border-top:1px solid rgba(255,255,255,.12);}
.sstat{display:flex;flex-direction:column;}
.sstat__num{font-size:1.75rem;font-weight:800;color:#fff;line-height:1;}
.sstat__label{font-size:.8rem;color:rgba(255,255,255,.55);margin-top:.25rem;}
.c2u-section{padding:4rem 1.5rem;}
.c2u-section--alt{background:#f8fafc;}
.c2u-section-inner{max-width:1200px;margin:0 auto;}
.c2u-section-heading{font-size:clamp(1.375rem,3vw,2rem);font-weight:800;color:#0f172a;letter-spacing:-.025em;margin:0 0 .5rem;}
.c2u-section-heading em{color:var(--sad);font-style:normal;}
.c2u-section-sub{font-size:.9375rem;color:#64748b;margin:0 0 2.5rem;line-height:1.6;max-width:560px;}
.section-header{margin-bottom:2.5rem;}
.section-header__actions{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;}
.course-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.25rem;}
.course-card{background:#fff;border:1.5px solid #e2e8f0;border-radius:1rem;padding:1.5rem;text-decoration:none;transition:border-color .2s,box-shadow .2s,transform .2s;display:flex;flex-direction:column;}
.course-card:hover{border-color:var(--sa);box-shadow:0 4px 24px rgba(59,130,246,.12);transform:translateY(-2px);}
.course-badge{display:inline-block;background:var(--sal);color:var(--sad);border-radius:.375rem;padding:.25rem .625rem;font-size:.75rem;font-weight:700;letter-spacing:.02em;margin-bottom:.75rem;}
.course-title{font-size:1.125rem;font-weight:800;color:#0f172a;margin:0 0 .25rem;}
.course-degree{font-size:.875rem;color:#64748b;margin:0 0 1rem;line-height:1.4;}
.course-meta{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem;}
.course-meta span{font-size:.8rem;color:#94a3b8;display:flex;align-items:center;gap:.375rem;}
.course-link{margin-top:auto;font-size:.875rem;font-weight:600;color:var(--sad);text-decoration:none;}
.course-link:hover{text-decoration:underline;}
.college-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.college-table{width:100%;border-collapse:collapse;font-size:.9rem;}
.college-table th{text-align:left;padding:.75rem 1rem;font-size:.8rem;font-weight:700;color:#64748b;letter-spacing:.04em;text-transform:uppercase;border-bottom:2px solid #e2e8f0;background:#f8fafc;}
.college-table td{padding:.875rem 1rem;border-bottom:1px solid #e2e8f0;color:#0f172a;}
.college-table tr:last-child td{border-bottom:none;}
.college-table tr:hover td{background:#f8fafc;}
.col-type{display:inline-block;padding:.2rem .625rem;border-radius:.25rem;font-size:.75rem;font-weight:600;}
.col-type--aided{background:#dcfce7;color:#166534;}
.col-type--priv{background:#fef3c7;color:#92400e;}
.col-type--deemed{background:#ede9fe;color:#5b21b6;}
.col-rank{display:inline-block;background:var(--sam);color:#1e40af;padding:.2rem .5rem;border-radius:.25rem;font-size:.75rem;font-weight:700;}
.exam-timeline{display:flex;flex-direction:column;}
.timeline-item{display:grid;grid-template-columns:160px 1fr;gap:1rem;padding:1rem 0;border-bottom:1px solid #e2e8f0;align-items:start;}
.timeline-item:last-child{border-bottom:none;}
.tl-date{font-size:.875rem;font-weight:700;color:var(--sad);}
.tl-event{font-size:.9375rem;color:#0f172a;}
.faq-list{max-width:760px;}
.faq-item{border-bottom:1px solid #e2e8f0;}
.faq-q{width:100%;display:flex;justify-content:space-between;align-items:center;background:none;border:none;cursor:pointer;padding:1rem 0;font-size:.9375rem;font-weight:600;color:#0f172a;text-align:left;gap:1rem;}
.faq-q__icon{flex-shrink:0;transition:transform .25s;color:#94a3b8;}
.faq-q[aria-expanded="true"] .faq-q__icon{transform:rotate(180deg);}
.faq-a{padding:0 0 1rem;font-size:.9375rem;line-height:1.65;color:#64748b;}
.faq-a[hidden]{display:none;}
.cta-banner{background:linear-gradient(135deg,var(--sal),var(--sam));border:1.5px solid #93c5fd;border-radius:1rem;padding:2.5rem;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1.5rem;margin-top:3rem;}
.cta-banner h2{font-size:1.25rem;font-weight:800;color:#1e3a8a;margin:0;}
.cta-banner p{font-size:.9375rem;color:var(--sad);margin:.25rem 0 0;}
.btn--cta{background:var(--sa);color:#fff;font-weight:700;font-size:.9375rem;padding:.75rem 1.75rem;border-radius:.5rem;border:none;cursor:pointer;text-decoration:none;white-space:nowrap;transition:background .2s;flex-shrink:0;}
.btn--cta:hover{background:var(--sad);}
/* ── Scroll-reveal animation (college2u-lazy.js contract) ───────────────
   .reveal-ready marks elements as animation-start state.
   .is-visible is added by IOHub or lazy.js on viewport entry.
   prefers-reduced-motion: skip animation, show immediately.
─────────────────────────────────────────────────────────────────────── */
.reveal-ready{opacity:0;transform:translateY(16px);transition:opacity .4s cubic-bezier(0.22,1,0.36,1),transform .4s cubic-bezier(0.22,1,0.36,1);}
.reveal-ready.is-visible{opacity:1;transform:none;}
@media(prefers-reduced-motion:reduce){.reveal-ready,.reveal-ready.is-visible{opacity:1;transform:none;transition:none;}}
/* Course cards inside stagger grid */
.course-grid.reveal-ready > .course-card,.course-grid > .course-card.reveal-ready{opacity:0;transform:translateY(12px);transition:opacity .35s cubic-bezier(0.22,1,0.36,1),transform .35s cubic-bezier(0.22,1,0.36,1);}
.course-grid > .course-card.is-visible{opacity:1;transform:none;}
/* Related links — replaces onmouseover/onmouseout inline handlers */
.related-link{display:inline-block;padding:.375rem .875rem;background:#fff;border:1.5px solid #e2e8f0;border-radius:2rem;font-size:.8125rem;font-weight:600;color:#374151;text-decoration:none;transition:border-color .2s,color .2s;}
.related-link:hover{border-color:var(--sa);color:var(--sad);}
.related-link:focus-visible{outline:3px solid var(--sa);outline-offset:2px;border-radius:2rem;}
/* Breadcrumb inside dark hero — override default ink colours */
.stream-hero .c2u-breadcrumb{font-size:.8125rem;}
.stream-hero .c2u-bc__link{color:rgba(255,255,255,.55);text-decoration:none;}
.stream-hero .c2u-bc__link:hover{color:rgba(255,255,255,.85);}
.stream-hero .c2u-bc__item+.c2u-bc__item::before{color:rgba(255,255,255,.3);}
.stream-hero .c2u-bc__current{color:rgba(255,255,255,.85);}
@media(max-width:640px){.timeline-item{grid-template-columns:1fr;gap:.25rem;}.tl-date{font-size:.8125rem;}}
</style>';

$page_js = <<<'JS'
(function(){
  document.querySelectorAll('.faq-q').forEach(function(btn){
    btn.addEventListener('click',function(){
      var exp=this.getAttribute('aria-expanded')==='true';
      document.querySelectorAll('.faq-q').forEach(function(b){b.setAttribute('aria-expanded','false');var p=document.getElementById(b.getAttribute('aria-controls'));if(p){p.hidden=true;}});
      if(!exp){this.setAttribute('aria-expanded','true');var panel=document.getElementById(this.getAttribute('aria-controls'));if(panel){panel.hidden=false;}}
    });
  });
})();
JS;

// ── 5. Header ─────────────────────────────────────────────────────────────────
require_once C2U_INCLUDES . '/header.php';
?>

<!-- ══════════════════════════════════════════════════════════════════════════
     STREAM HERO
     H1: Engineering Colleges in Bangalore 2026
══════════════════════════════════════════════════════════════════════════════ -->
<section class="stream-hero" aria-labelledby="stream-h1">
  <div class="stream-hero__bg" role="presentation" aria-hidden="true"></div>
  <div class="stream-hero__inner">

    <!-- Breadcrumb — rendered via c2u_render_breadcrumb(); separator via CSS ::before -->
    <div style="margin-bottom:1.25rem;">
      <?= c2u_render_breadcrumb($breadcrumbs) ?>
    </div>

    <p class="stream-eyebrow" aria-label="Stream category">
      <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8M12 17v4"/></svg>
      Engineering Admissions <?= $current_year ?>
    </p>

    <h1 class="stream-h1" id="stream-h1">
      Engineering Colleges in <em>Bangalore</em> <?= $current_year ?>
    </h1>

    <p class="stream-hero__sub">
      <abbr title="Karnataka Common Entrance Test">KCET</abbr> and <abbr title="Consortium of Medical, Engineering and Dental Colleges of Karnataka">COMEDK</abbr> cutoffs,
      branch-wise seat matrix, annual fees, and <abbr title="All India Council for Technical Education">AICTE</abbr>-approved college
      rankings for every engineering programme in Bangalore — verified from official sources.
    </p>

    <div class="stream-hero__ctas">
      <a href="<?= c2u_e(c2u_url('engineering/engineering-admission')) ?>" class="btn--stream-primary">
        B.E / B.Tech Admission <?= $current_year ?> →
      </a>
      <a href="<?= c2u_e(c2u_url('engineering/top-engineering-colleges')) ?>" class="btn--stream-secondary">
        View top engineering colleges
      </a>
    </div>

    <!-- Quick stats -->
    <div class="stream-stats" role="list">
      <div class="sstat" role="listitem">
        <span class="sstat__num" data-counter data-target="63">63+</span>
        <span class="sstat__label">Engineering colleges, Bangalore</span>
      </div>
      <div class="sstat" role="listitem">
        <span class="sstat__num" data-counter data-target="35000">35,000+</span>
        <span class="sstat__label">B.E/B.Tech seats, Bangalore</span>
      </div>
      <div class="sstat" role="listitem">
        <span class="sstat__num">20+</span>
        <span class="sstat__label">Engineering branches</span>
      </div>
      <div class="sstat" role="listitem">
        <span class="sstat__num">Free</span>
        <span class="sstat__label">Expert counselling</span>
      </div>
    </div>
  </div>
</section>

<!-- ══════════════════════════════════════════════════════════════════════════
     ENGINEERING COURSES GRID
     H2: Engineering courses in Bangalore — what you can study
══════════════════════════════════════════════════════════════════════════════ -->
<section class="c2u-section" id="courses" aria-labelledby="courses-h2" data-reveal>
  <div class="c2u-section-inner">
    <header class="section-header">
      <h2 class="c2u-section-heading" id="courses-h2">
        Engineering courses in Bangalore — what you can study
      </h2>
      <p class="c2u-section-sub">
        All undergraduate engineering programmes below are available through
        <abbr title="Karnataka Common Entrance Test">KCET</abbr> or <abbr title="COMEDK Undergraduate Entrance Test">COMEDK UGET</abbr> in <?= $current_year ?>.
        Click any course for cutoffs, fees, and admission steps.
      </p>
    </header>

    <div class="course-grid" data-animate="stagger" role="list">
      <?php foreach ($engineering_courses as $ec): ?>
      <a href="<?= c2u_e($ec['href']) ?>" class="course-card" role="listitem" aria-label="<?= c2u_e($ec['title']) ?> admission guide">
        <span class="course-badge"><?= c2u_e($ec['title']) ?></span>
        <h3 class="course-title"><?= c2u_e($ec['title']) ?></h3>
        <p class="course-degree"><?= c2u_e($ec['degree']) ?></p>
        <div class="course-meta">
          <span>
            <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
            <?= c2u_e($ec['dur']) ?>
          </span>
          <span>
            <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
            <?= c2u_e($ec['seats']) ?>
          </span>
        </div>
        <span class="course-link"><?= c2u_e($ec['cta']) ?></span>
      </a>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<!-- ══════════════════════════════════════════════════════════════════════════
     TOP ENGINEERING COLLEGES TABLE
     H2: Top engineering colleges in Bangalore 2026
══════════════════════════════════════════════════════════════════════════════ -->
<section class="c2u-section c2u-section--alt" id="colleges" aria-labelledby="colleges-h2" data-reveal>
  <div class="c2u-section-inner">
    <div class="section-header__actions">
      <div>
        <h2 class="c2u-section-heading" id="colleges-h2">
          Top engineering colleges in Bangalore <?= $current_year ?>
        </h2>
        <p class="c2u-section-sub" style="margin-bottom:0;">
          <abbr title="All India Council for Technical Education">AICTE</abbr>-approved colleges with NAAC accreditation.
          Cutoff data from KEA allotment <?= $current_year - 1 ?>.
        </p>
      </div>
      <a href="<?= c2u_e(c2u_url('engineering/top-engineering-colleges')) ?>"
         style="font-size:.875rem;font-weight:600;color:var(--sad);text-decoration:none;white-space:nowrap;">
        View all engineering colleges →
      </a>
    </div>

    <div style="margin-top:2rem;" class="college-table-wrap">
      <table class="college-table" aria-label="Top engineering colleges in Bangalore <?= $current_year ?>">
        <thead>
          <tr>
            <th scope="col">#</th>
            <th scope="col">College</th>
            <th scope="col">Type</th>
            <th scope="col">Established</th>
            <th scope="col">NAAC</th>
            <th scope="col">Details</th>
          </tr>
        </thead>
        <tbody>
          <?php foreach ($top_colleges as $i => $col): ?>
          <tr>
            <td style="color:#94a3b8;font-weight:600;"><?= $i + 1 ?></td>
            <td>
              <div style="display:flex;align-items:center;gap:.75rem;">
                <?= logoHtml($col['name'], c2u_slug($col['short']), 'College2U', 36) ?>
                <div>
                  <div style="font-weight:600;color:#0f172a;"><?= c2u_e($col['name']) ?></div>
                  <div style="font-size:.8rem;color:#94a3b8;">Bangalore, Karnataka</div>
                </div>
              </div>
            </td>
            <td>
              <?php
              $typeClass = match(true) {
                  str_contains($col['type'], 'Aided')  => 'col-type--aided',
                  str_contains($col['type'], 'Deemed') => 'col-type--deemed',
                  default => 'col-type--priv',
              };
              ?>
              <span class="col-type <?= $typeClass ?>"><?= c2u_e($col['type']) ?></span>
            </td>
            <td style="color:#64748b;"><?= c2u_e((string)$col['est']) ?></td>
            <td><span class="col-rank"><?= c2u_e($col['rank']) ?></span></td>
            <td>
              <a href="<?= c2u_e(c2u_url('engineering/top-engineering-colleges')) ?>"
                 style="font-size:.875rem;font-weight:600;color:var(--sad);text-decoration:none;">
                View →
              </a>
            </td>
          </tr>
          <?php endforeach; ?>
        </tbody>
      </table>
    </div>
  </div>
</section>

<!-- ══════════════════════════════════════════════════════════════════════════
     EXAM TIMELINE
     H2: KCET & COMEDK 2026 key dates
══════════════════════════════════════════════════════════════════════════════ -->
<section class="c2u-section" id="exam-dates" aria-labelledby="exams-h2" data-reveal>
  <div class="c2u-section-inner" style="max-width:800px;">
    <header class="section-header">
      <h2 class="c2u-section-heading" id="exams-h2">
        <abbr title="Karnataka Common Entrance Test">KCET</abbr> &amp; <abbr title="COMEDK Undergraduate Entrance Test">COMEDK</abbr> <?= $current_year ?> key dates
      </h2>
      <p class="c2u-section-sub">
        Based on the official KEA and COMEDK academic calendar for <?= $current_year ?>.
        Verify at <a href="https://kea.kar.nic.in" rel="noopener noreferrer" target="_blank" style="color:var(--sad);">kea.kar.nic.in</a> before registration.
      </p>
    </header>

    <div class="exam-timeline" role="list">
      <?php foreach ($exam_dates as $ed): ?>
      <div class="timeline-item" role="listitem">
        <span class="tl-date"><?= c2u_e($ed['date']) ?></span>
        <span class="tl-event"><?= c2u_e($ed['event']) ?></span>
      </div>
      <?php endforeach; ?>
    </div>

    <p style="margin-top:1.5rem;font-size:.875rem;color:#94a3b8;">
      <strong>Note:</strong> Always verify with the official KCET notification at
      <a href="https://kea.kar.nic.in" rel="noopener noreferrer" target="_blank" style="color:var(--sad);">kea.kar.nic.in</a>
      and COMEDK at <a href="https://comedk.org" rel="noopener noreferrer" target="_blank" style="color:var(--sad);">comedk.org</a>.
    </p>
  </div>
</section>

<!-- ══════════════════════════════════════════════════════════════════════════
     FAQ SECTION
     AEO: direct declarative answers
══════════════════════════════════════════════════════════════════════════════ -->
<section class="c2u-section c2u-section--alt" id="faq" aria-labelledby="faq-h2" data-reveal>
  <div class="c2u-section-inner">
    <header class="section-header">
      <h2 class="c2u-section-heading" id="faq-h2">
        Frequently asked questions — Engineering admission Bangalore
      </h2>
    </header>

    <div class="faq-list" role="list">
      <?php foreach ($faqs as $i => $faq): ?>
      <div class="faq-item" role="listitem">
        <button class="faq-q"
                id="efaq-btn-<?= $i ?>"
                type="button"
                aria-expanded="false"
                aria-controls="efaq-a-<?= $i ?>">
          <span><?= c2u_e($faq['q']) ?></span>
          <span class="faq-q__icon" aria-hidden="true">
            <svg width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><path d="M4 6l5 5 5-5"/></svg>
          </span>
        </button>
        <div class="faq-a" id="efaq-a-<?= $i ?>"
             role="region" aria-labelledby="efaq-btn-<?= $i ?>"
             data-aeo-speakable hidden>
          <p><?= c2u_e($faq['a']) ?></p>
        </div>
      </div>
      <?php endforeach; ?>
    </div>

    <div class="cta-banner" role="complementary" aria-label="Engineering admission guidance">
      <div>
        <h2>Need help choosing an engineering college in Bangalore?</h2>
        <p>Get a free shortlist based on your KCET or COMEDK rank — from College2U counsellors.</p>
      </div>
      <a href="<?= c2u_e(c2u_url('counselor-booking')) ?>" class="btn--cta">
        Book free counselling →
      </a>
    </div>

    <!-- Internal link cluster -->
    <nav aria-label="Related engineering admission guides" style="margin-top:3rem;">
      <h3 style="font-size:.875rem;font-weight:700;color:#64748b;letter-spacing:.04em;text-transform:uppercase;margin:0 0 1rem;">
        Related guides
      </h3>
      <ul style="list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:.625rem;">
        <?php
        $related = [
            ['B.E Admission Bangalore ' . $current_year,         c2u_url('engineering/engineering-admission')],
            ['Top Engineering Colleges Bangalore',               c2u_url('engineering/top-engineering-colleges')],
            ['KCET ' . $current_year . ' Cutoff & Counselling',  c2u_url('exams/kcet-2026')],
            ['COMEDK UGET ' . $current_year . ' Guide',          c2u_url('exams/comedk-2026')],
            ['All Engineering Colleges Bangalore',               c2u_url('colleges')],
            ['Management Admission Bangalore',                   c2u_url('management')],
        ];
        foreach ($related as [$label, $href]): ?>
        <li>
          <a href="<?= c2u_e($href) ?>" class="related-link">
            <?= c2u_e($label) ?>
          </a>
        </li>
        <?php endforeach; ?>
      </ul>
    </nav>
  </div>
</section>

<?php require_once C2U_INCLUDES . '/footer.php'; ?>
